/*
 * Copyright (c) 2016 zhangcm. All Rights Reserved.
 */
package com.deram.ctin.serv.system.api;

import com.deram.ctin.serv.system.entity.SysUser;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangcm
 * @version 1.0, 2017/8/26
 */
@FeignClient("serv-system")
@RequestMapping("/sysUserApi")
public interface SysUserApi {

    @GetMapping("/find")
    SysUser find(@RequestParam("id") Long id, @RequestParam("type") Integer type);

    @GetMapping("/findByUsername")
    SysUser findByUsername(@RequestParam("username") String username, @RequestParam("type") Integer type);

    @PostMapping("/create")
    SysUser create(@RequestBody SysUser param);

    @PostMapping("/updatePassword")
    void updatePassword(@RequestParam("id") Long id, @RequestParam("newPassword") String newPassword);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id);
}
